{extend name="base/container" /}
{block name="main"}
<div class="layui-form layui-form-pane account-list" lay-filter="account">
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">用户查询</label>
            <div class="layui-input-block">
                <input type="text" id="tableReload" name="uid" placeholder="请输入用户账号/手机号/会员卡号" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <button id="account_reload" data-type="reload" class="layui-btn layui-btn-fluid" lay-submit="" lay-filter="go">
                <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>查询
            </button>
        </div>
    </div>
</div>
<table class="layui-table" id="accountTable" lay-filter="accountTb">
    <thead>
        <tr>
            <th lay-data="{field:'xh', type:'numbers'}">序号</th>
            <th lay-data="{field:'account'}">用户账户</th>
            <th lay-data="{field:'nickname'}">昵称</th>
            <th lay-data="{field:'amount', templet:function(d){return layui.xls_format.format_amount(d.amount);}}">卡余额</th>
            <th lay-data="{field:'status', templet:function(d){return layui.xls_format.format_account_status(d.status);}}">卡状态</th>
        </tr> 
    </thead>
</table>
<script type="text/javascript">
    layui.use(["table"],function(){
        var table = layui.table;
        //转换静态表格,table.init(filter, options)
        table.init('accountTb', {
            url:'{$url}',
            page:true,
            //count: count,
            limit: 5, //注意：请务必确保 limit 参数（默认：10）是与你服务端限定的数据条数一致
            limits: [5,10,20],
            id: 'accountReload' // 要重载的表格ID
        }); 
    })
</script>
{/block}

{block name="footer"}
{__block__}
{/block}